<template>

	<view>
		
		<u-tag :text="form.time" type="primary"  shape="circleRight"/>
		
		<u-cell-group v-for="item in this.form.list" class="cell">
			<u-cell-item icon="order" title="" :arrow="false" :border-top="true" bg-color="whilte" class="cell-item">
				<view class="font">
					 {{item.item}}
				</view>
			</u-cell-item>
		</u-cell-group>

		<u-card title-color="#2979FF" :title-size="22" :border="true" :full="isFull" title="总结" margin="30rpx">
			<view slot="body">
				<view>
					<view> {{form.content}}</view>

				</view>
			</view>
		</u-card>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				isFull: true,
				form: {
					time: undefined,
					list: [],
					content: undefined
				}
			}
		},
		methods: {
			getRecordById(id) {
				this.$u.get('/record/' + id)
					.then(res => {
						console.info("当前的记录是", res.data.item)
						const source = res.data.item
						this.form.list = JSON.parse(source.list)
						this.form.content= source.content
						this.form.time = source.createTime
					})
			}
		},
		onLoad(options) {
			console.info(options)
			this.getRecordById(options.id)
		}
	}
</script>

<style>
	.cell-item {
		margin-top: 10px;
	}

	.font {
		float: left;
	}
</style>
